function mapToJson(args){
    return JSON.stringify([...args]);
}

let map = new Map().set("name","ansel").set("ctx","dwa");

console.log(mapToJson(map))


//map转Array
const mapToArray = new Map([[1,1],[2,2],[3,3]]);
console.log(...map)

//Array转map
const arrayToMap = new Map([[1,1],[2,2],[3,3]]);
console.log(map)

// const data = {};
// const element = document.getElementsByClassName('App');

// data[element] = 'metadata';
// console.log(data['[object HTMLCollection]']) // "metadata"